1. Field of the Invention
The present invention relates to MPEG-2 compression/recovery system, and more particularly, to a method for recovering a moving picture in MPEG-2 decompression system.
2. Background of the Related Art
Due to the development of recent digital signal processing techniques, methods for compression and transmission of moving picture information through a transmission channel of a limited bandwidth have been developed. MPEG-2 is a generally used digital video compression method which uses variable length coding such as the Huffinan coding and run-length coding, each having coded video bitstream. However, the digital compression is so sensitive to an error that, not only deterioration of a picture quality, but also propagation of the error in terms of time and space, occurs.
Particularly, when there is an error in a coded video bitstream, there are a variety of effects due to the error depending on the method of coding used. When an error occurs in MPEG bitstream, all information is damaged until a slice header, namely the next synchronization signal, is detected. The use of motion compensation coding causes continuous damage over many frames even after the damaged portion. Even if an error occurs in the transmission channel rather than the coded video bitstream itself, a picture quality of the recovered picture is poor.
To prevent errors occurring on the channel, a method for making an unequal compensation of errors by a hierarchal classification of a bitstream in the channel coding has been developed. This method reduces deterioration of the picture quality relatively simply by inserting a compensation algorithm both at an end of a transmission terminal and at a beginning of a reception terminal. However, this method cannot avoid picture quality deterioration and error propagation for errors outside of the error correction capability. Consequently, parallel processing, such as a forced insertion of an internal block in the coding and replacement with a prior picture in a decoding, is required. In order to recover the picture closely to an original picture, error concealing methods for complementing lost information with neighboring information properly recovered, rather than by an additional error correction code using the limited bandwidth, have been developing.
In the error concealing methods used in digital TVs, there are a spatial prediction error concealing method in which spatial duplication in the same frame containing lost information is utilized, and a temporal prediction error concealing method which uses the temporal redundancy between successive frames. The spatial prediction error concealing method compensates for a damaged macro block by using, not the temporal duplication, but information on macro blocks which are not damaged at the present frame. In this instance, different error concealing methods are suggested, in which the damaged macro block is replaced with a corresponding block close to the damaged block, or various interpolations are used.
However, in a case of such methods, it is difficult to expect of visibility the recovered picture because the information used for recovering the damaged macro block is limited to blocks above and below the damaged block. Also, if the damaged macro block has a size adequately smaller than the picture, an excellent picture quality compensation can be assured, but a large damaged macro block results in a poor recovered picture and much calculation for compensation is required at the receiver.
The temporal prediction concealing method recovers the damaged macro block by predicting a motion vector as an average of motion vectors of adjacent macro blocks in a temporal region, and using the predicted motion vector. That is, as successive pictures are correlated in terms of time, information on the damaged macro block in the present frame is recovered by using information in the previous frame and using the temporal correlation. As most general methods, there are a method in which information on the damaged block is replaced with information on macro blocks in the previous frame at identical positions, and a method in which a motion vector of the damage macro block is predicted from an average of motion vectors of macro blocks above and below the damaged macro block.
Although the temporal prediction concealing method is less complicated and fast, the method has a low reliability. That is, a simple replacement may cause substantial deterioration of the picture quality in a case when there is much motion between two successive frames because motions of the damaged macro blocks in the present frame are not taken into account. Also, the averaging method may cause a problem in a case when the adjacent macro block have no motion vector.
Accordingly, an object of the present invention is to solve at least the problems and disadvantages of the related art.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objects and advantages of the invention may be realized and attained as particularly pointed out in the appended claims.
To achieve the objects and in accordance with the purposes of the invention, as embodied and broadly described herein, a method for recovering a moving picture, in which an error is concealed if an error occurs in a slice of a frame having a plurality of slices where each slice has a plurality of macro blocks, includes (1) extending a range of a damaged slice to include regions of undamaged slices adjacent to the damaged slice, and (2) obtaining a motion vector with the extended regions in a previous frame, to detect a region most similar to the extended regions, and transferring a macro block having the most similar region to the damaged macro block.
In another embodiment of the present invention, a method for recovering a moving picture includes (1) extending damaged macro blocks in upper and lower directions to include regions of undamaged macro blocks, (2) obtaining motion vectors for the damaged macro blocks with a previous frame by using the extended regions and averaging the motion vectors to set up an initial motion vector prediction value for the damaged macro blocks, and (3) setting up a search region of the macro block in previous frame centered on the initial motion vector prediction value, detecting a region most similar to the extended region from the search region, and transferring a macro block having the most similar region to the damaged macro block.
Here, the extended region may be extended in pixel units.
In still another embodiment of the present invention, a method for recovering a moving picture includes (1) extending each macro block in the damaged slice in upper and lower directions to include regions of undamaged macro blocks, (2) dividing the extended regions into a plurality of sub-blocks and obtaining a motion vector for each of the sub-blocks, (3) respectively obtaining a difference between blocks transferred from a previous frame by using the motion vector and setting up a weighted value to each of the sub-blocks according to the difference, (4) multiplying the weighted values to respective sub-blocks, summing the multiplied values, and determining the sum as a motion vector of the damaged block, and (5) searching a previous macro block for the most similar region to the extended region by using the determined motion vector, and transferring a macro block having the most similar region to the damaged macro block.
Here, each of the plurality of sub-blocks is defined between adjacent macro blocks on top and bottom to be shared by the two adjacent macro blocks. Also, the weighted value is large if the difference is small, and the weighted value is small if the difference is great.